<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: navo/algorithm/crypto/symmetric/twofish.c源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>navo/algorithm/crypto/symmetric/twofish.c</h1>  </div>
</div>
<div class="contents">
<a href="twofish_8c.html">浏览该文件的文档。</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */</span>
<a name="l00011"></a>00011 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#pragma optimize(&quot;t&quot;, on)</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#endif  </span><span class="comment">/* #ifdef _MSC_VER */</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;<a class="code" href="twofish_8h.html" title="Twofish.">twofish.h</a>&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="endian_8h.html" title="Definitions for byte order.">../../../port/endian.h</a>&quot;</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00020"></a>00020 <span class="preprocessor">#endif </span><span class="comment">/* #ifdef __cplusplus */</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> Q0[256] = {
<a name="l00023"></a>00023     0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
<a name="l00024"></a>00024     0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C,
<a name="l00025"></a>00025     0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30,
<a name="l00026"></a>00026     0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82,
<a name="l00027"></a>00027     0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE,
<a name="l00028"></a>00028     0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B,
<a name="l00029"></a>00029     0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45,
<a name="l00030"></a>00030     0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7,
<a name="l00031"></a>00031     0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF,
<a name="l00032"></a>00032     0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8,
<a name="l00033"></a>00033     0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED,
<a name="l00034"></a>00034     0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90,
<a name="l00035"></a>00035     0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B,
<a name="l00036"></a>00036     0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B,
<a name="l00037"></a>00037     0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F,
<a name="l00038"></a>00038     0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A,
<a name="l00039"></a>00039     0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17,
<a name="l00040"></a>00040     0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72,
<a name="l00041"></a>00041     0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68,
<a name="l00042"></a>00042     0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4,
<a name="l00043"></a>00043     0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42,
<a name="l00044"></a>00044     0x4A, 0x5E, 0xC1, 0xE0
<a name="l00045"></a>00045 };
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> Q1[256] = {
<a name="l00048"></a>00048     0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
<a name="l00049"></a>00049     0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1,
<a name="l00050"></a>00050     0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B,
<a name="l00051"></a>00051     0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5,
<a name="l00052"></a>00052     0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54,
<a name="l00053"></a>00053     0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96,
<a name="l00054"></a>00054     0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7,
<a name="l00055"></a>00055     0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8,
<a name="l00056"></a>00056     0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF,
<a name="l00057"></a>00057     0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9,
<a name="l00058"></a>00058     0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D,
<a name="l00059"></a>00059     0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E,
<a name="l00060"></a>00060     0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21,
<a name="l00061"></a>00061     0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01,
<a name="l00062"></a>00062     0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E,
<a name="l00063"></a>00063     0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64,
<a name="l00064"></a>00064     0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44,
<a name="l00065"></a>00065     0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E,
<a name="l00066"></a>00066     0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B,
<a name="l00067"></a>00067     0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9,
<a name="l00068"></a>00068     0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56,
<a name="l00069"></a>00069     0x55, 0x09, 0xBE, 0x91
<a name="l00070"></a>00070 };
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="keyword">static</span> <span class="keyword">const</span> uint32_t MDS[4][256] = {
<a name="l00073"></a>00073     {
<a name="l00074"></a>00074     0xBCBC3275UL, 0xECEC21F3UL, 0x202043C6UL, 0xB3B3C9F4UL, 0xDADA03DBUL, 0x02028B7BUL,
<a name="l00075"></a>00075     0xE2E22BFBUL, 0x9E9EFAC8UL, 0xC9C9EC4AUL, 0xD4D409D3UL, 0x18186BE6UL, 0x1E1E9F6BUL,
<a name="l00076"></a>00076     0x98980E45UL, 0xB2B2387DUL, 0xA6A6D2E8UL, 0x2626B74BUL, 0x3C3C57D6UL, 0x93938A32UL,
<a name="l00077"></a>00077     0x8282EED8UL, 0x525298FDUL, 0x7B7BD437UL, 0xBBBB3771UL, 0x5B5B97F1UL, 0x474783E1UL,
<a name="l00078"></a>00078     0x24243C30UL, 0x5151E20FUL, 0xBABAC6F8UL, 0x4A4AF31BUL, 0xBFBF4887UL, 0x0D0D70FAUL,
<a name="l00079"></a>00079     0xB0B0B306UL, 0x7575DE3FUL, 0xD2D2FD5EUL, 0x7D7D20BAUL, 0x666631AEUL, 0x3A3AA35BUL,
<a name="l00080"></a>00080     0x59591C8AUL, 0x00000000UL, 0xCDCD93BCUL, 0x1A1AE09DUL, 0xAEAE2C6DUL, 0x7F7FABC1UL,
<a name="l00081"></a>00081     0x2B2BC7B1UL, 0xBEBEB90EUL, 0xE0E0A080UL, 0x8A8A105DUL, 0x3B3B52D2UL, 0x6464BAD5UL,
<a name="l00082"></a>00082     0xD8D888A0UL, 0xE7E7A584UL, 0x5F5FE807UL, 0x1B1B1114UL, 0x2C2CC2B5UL, 0xFCFCB490UL,
<a name="l00083"></a>00083     0x3131272CUL, 0x808065A3UL, 0x73732AB2UL, 0x0C0C8173UL, 0x79795F4CUL, 0x6B6B4154UL,
<a name="l00084"></a>00084     0x4B4B0292UL, 0x53536974UL, 0x94948F36UL, 0x83831F51UL, 0x2A2A3638UL, 0xC4C49CB0UL,
<a name="l00085"></a>00085     0x2222C8BDUL, 0xD5D5F85AUL, 0xBDBDC3FCUL, 0x48487860UL, 0xFFFFCE62UL, 0x4C4C0796UL,
<a name="l00086"></a>00086     0x4141776CUL, 0xC7C7E642UL, 0xEBEB24F7UL, 0x1C1C1410UL, 0x5D5D637CUL, 0x36362228UL,
<a name="l00087"></a>00087     0x6767C027UL, 0xE9E9AF8CUL, 0x4444F913UL, 0x1414EA95UL, 0xF5F5BB9CUL, 0xCFCF18C7UL,
<a name="l00088"></a>00088     0x3F3F2D24UL, 0xC0C0E346UL, 0x7272DB3BUL, 0x54546C70UL, 0x29294CCAUL, 0xF0F035E3UL,
<a name="l00089"></a>00089     0x0808FE85UL, 0xC6C617CBUL, 0xF3F34F11UL, 0x8C8CE4D0UL, 0xA4A45993UL, 0xCACA96B8UL,
<a name="l00090"></a>00090     0x68683BA6UL, 0xB8B84D83UL, 0x38382820UL, 0xE5E52EFFUL, 0xADAD569FUL, 0x0B0B8477UL,
<a name="l00091"></a>00091     0xC8C81DC3UL, 0x9999FFCCUL, 0x5858ED03UL, 0x19199A6FUL, 0x0E0E0A08UL, 0x95957EBFUL,
<a name="l00092"></a>00092     0x70705040UL, 0xF7F730E7UL, 0x6E6ECF2BUL, 0x1F1F6EE2UL, 0xB5B53D79UL, 0x09090F0CUL,
<a name="l00093"></a>00093     0x616134AAUL, 0x57571682UL, 0x9F9F0B41UL, 0x9D9D803AUL, 0x111164EAUL, 0x2525CDB9UL,
<a name="l00094"></a>00094     0xAFAFDDE4UL, 0x4545089AUL, 0xDFDF8DA4UL, 0xA3A35C97UL, 0xEAEAD57EUL, 0x353558DAUL,
<a name="l00095"></a>00095     0xEDEDD07AUL, 0x4343FC17UL, 0xF8F8CB66UL, 0xFBFBB194UL, 0x3737D3A1UL, 0xFAFA401DUL,
<a name="l00096"></a>00096     0xC2C2683DUL, 0xB4B4CCF0UL, 0x32325DDEUL, 0x9C9C71B3UL, 0x5656E70BUL, 0xE3E3DA72UL,
<a name="l00097"></a>00097     0x878760A7UL, 0x15151B1CUL, 0xF9F93AEFUL, 0x6363BFD1UL, 0x3434A953UL, 0x9A9A853EUL,
<a name="l00098"></a>00098     0xB1B1428FUL, 0x7C7CD133UL, 0x88889B26UL, 0x3D3DA65FUL, 0xA1A1D7ECUL, 0xE4E4DF76UL,
<a name="l00099"></a>00099     0x8181942AUL, 0x91910149UL, 0x0F0FFB81UL, 0xEEEEAA88UL, 0x161661EEUL, 0xD7D77321UL,
<a name="l00100"></a>00100     0x9797F5C4UL, 0xA5A5A81AUL, 0xFEFE3FEBUL, 0x6D6DB5D9UL, 0x7878AEC5UL, 0xC5C56D39UL,
<a name="l00101"></a>00101     0x1D1DE599UL, 0x7676A4CDUL, 0x3E3EDCADUL, 0xCBCB6731UL, 0xB6B6478BUL, 0xEFEF5B01UL,
<a name="l00102"></a>00102     0x12121E18UL, 0x6060C523UL, 0x6A6AB0DDUL, 0x4D4DF61FUL, 0xCECEE94EUL, 0xDEDE7C2DUL,
<a name="l00103"></a>00103     0x55559DF9UL, 0x7E7E5A48UL, 0x2121B24FUL, 0x03037AF2UL, 0xA0A02665UL, 0x5E5E198EUL,
<a name="l00104"></a>00104     0x5A5A6678UL, 0x65654B5CUL, 0x62624E58UL, 0xFDFD4519UL, 0x0606F48DUL, 0x404086E5UL,
<a name="l00105"></a>00105     0xF2F2BE98UL, 0x3333AC57UL, 0x17179067UL, 0x05058E7FUL, 0xE8E85E05UL, 0x4F4F7D64UL,
<a name="l00106"></a>00106     0x89896AAFUL, 0x10109563UL, 0x74742FB6UL, 0x0A0A75FEUL, 0x5C5C92F5UL, 0x9B9B74B7UL,
<a name="l00107"></a>00107     0x2D2D333CUL, 0x3030D6A5UL, 0x2E2E49CEUL, 0x494989E9UL, 0x46467268UL, 0x77775544UL,
<a name="l00108"></a>00108     0xA8A8D8E0UL, 0x9696044DUL, 0x2828BD43UL, 0xA9A92969UL, 0xD9D97929UL, 0x8686912EUL,
<a name="l00109"></a>00109     0xD1D187ACUL, 0xF4F44A15UL, 0x8D8D1559UL, 0xD6D682A8UL, 0xB9B9BC0AUL, 0x42420D9EUL,
<a name="l00110"></a>00110     0xF6F6C16EUL, 0x2F2FB847UL, 0xDDDD06DFUL, 0x23233934UL, 0xCCCC6235UL, 0xF1F1C46AUL,
<a name="l00111"></a>00111     0xC1C112CFUL, 0x8585EBDCUL, 0x8F8F9E22UL, 0x7171A1C9UL, 0x9090F0C0UL, 0xAAAA539BUL,
<a name="l00112"></a>00112     0x0101F189UL, 0x8B8BE1D4UL, 0x4E4E8CEDUL, 0x8E8E6FABUL, 0xABABA212UL, 0x6F6F3EA2UL,
<a name="l00113"></a>00113     0xE6E6540DUL, 0xDBDBF252UL, 0x92927BBBUL, 0xB7B7B602UL, 0x6969CA2FUL, 0x3939D9A9UL,
<a name="l00114"></a>00114     0xD3D30CD7UL, 0xA7A72361UL, 0xA2A2AD1EUL, 0xC3C399B4UL, 0x6C6C4450UL, 0x07070504UL,
<a name="l00115"></a>00115     0x04047FF6UL, 0x272746C2UL, 0xACACA716UL, 0xD0D07625UL, 0x50501386UL, 0xDCDCF756UL,
<a name="l00116"></a>00116     0x84841A55UL, 0xE1E15109UL, 0x7A7A25BEUL, 0x1313EF91UL
<a name="l00117"></a>00117     }, {
<a name="l00118"></a>00118     0xA9D93939UL, 0x67901717UL, 0xB3719C9CUL, 0xE8D2A6A6UL, 0x04050707UL, 0xFD985252UL,
<a name="l00119"></a>00119     0xA3658080UL, 0x76DFE4E4UL, 0x9A084545UL, 0x92024B4BUL, 0x80A0E0E0UL, 0x78665A5AUL,
<a name="l00120"></a>00120     0xE4DDAFAFUL, 0xDDB06A6AUL, 0xD1BF6363UL, 0x38362A2AUL, 0x0D54E6E6UL, 0xC6432020UL,
<a name="l00121"></a>00121     0x3562CCCCUL, 0x98BEF2F2UL, 0x181E1212UL, 0xF724EBEBUL, 0xECD7A1A1UL, 0x6C774141UL,
<a name="l00122"></a>00122     0x43BD2828UL, 0x7532BCBCUL, 0x37D47B7BUL, 0x269B8888UL, 0xFA700D0DUL, 0x13F94444UL,
<a name="l00123"></a>00123     0x94B1FBFBUL, 0x485A7E7EUL, 0xF27A0303UL, 0xD0E48C8CUL, 0x8B47B6B6UL, 0x303C2424UL,
<a name="l00124"></a>00124     0x84A5E7E7UL, 0x54416B6BUL, 0xDF06DDDDUL, 0x23C56060UL, 0x1945FDFDUL, 0x5BA33A3AUL,
<a name="l00125"></a>00125     0x3D68C2C2UL, 0x59158D8DUL, 0xF321ECECUL, 0xAE316666UL, 0xA23E6F6FUL, 0x82165757UL,
<a name="l00126"></a>00126     0x63951010UL, 0x015BEFEFUL, 0x834DB8B8UL, 0x2E918686UL, 0xD9B56D6DUL, 0x511F8383UL,
<a name="l00127"></a>00127     0x9B53AAAAUL, 0x7C635D5DUL, 0xA63B6868UL, 0xEB3FFEFEUL, 0xA5D63030UL, 0xBE257A7AUL,
<a name="l00128"></a>00128     0x16A7ACACUL, 0x0C0F0909UL, 0xE335F0F0UL, 0x6123A7A7UL, 0xC0F09090UL, 0x8CAFE9E9UL,
<a name="l00129"></a>00129     0x3A809D9DUL, 0xF5925C5CUL, 0x73810C0CUL, 0x2C273131UL, 0x2576D0D0UL, 0x0BE75656UL,
<a name="l00130"></a>00130     0xBB7B9292UL, 0x4EE9CECEUL, 0x89F10101UL, 0x6B9F1E1EUL, 0x53A93434UL, 0x6AC4F1F1UL,
<a name="l00131"></a>00131     0xB499C3C3UL, 0xF1975B5BUL, 0xE1834747UL, 0xE66B1818UL, 0xBDC82222UL, 0x450E9898UL,
<a name="l00132"></a>00132     0xE26E1F1FUL, 0xF4C9B3B3UL, 0xB62F7474UL, 0x66CBF8F8UL, 0xCCFF9999UL, 0x95EA1414UL,
<a name="l00133"></a>00133     0x03ED5858UL, 0x56F7DCDCUL, 0xD4E18B8BUL, 0x1C1B1515UL, 0x1EADA2A2UL, 0xD70CD3D3UL,
<a name="l00134"></a>00134     0xFB2BE2E2UL, 0xC31DC8C8UL, 0x8E195E5EUL, 0xB5C22C2CUL, 0xE9894949UL, 0xCF12C1C1UL,
<a name="l00135"></a>00135     0xBF7E9595UL, 0xBA207D7DUL, 0xEA641111UL, 0x77840B0BUL, 0x396DC5C5UL, 0xAF6A8989UL,
<a name="l00136"></a>00136     0x33D17C7CUL, 0xC9A17171UL, 0x62CEFFFFUL, 0x7137BBBBUL, 0x81FB0F0FUL, 0x793DB5B5UL,
<a name="l00137"></a>00137     0x0951E1E1UL, 0xADDC3E3EUL, 0x242D3F3FUL, 0xCDA47676UL, 0xF99D5555UL, 0xD8EE8282UL,
<a name="l00138"></a>00138     0xE5864040UL, 0xC5AE7878UL, 0xB9CD2525UL, 0x4D049696UL, 0x44557777UL, 0x080A0E0EUL,
<a name="l00139"></a>00139     0x86135050UL, 0xE730F7F7UL, 0xA1D33737UL, 0x1D40FAFAUL, 0xAA346161UL, 0xED8C4E4EUL,
<a name="l00140"></a>00140     0x06B3B0B0UL, 0x706C5454UL, 0xB22A7373UL, 0xD2523B3BUL, 0x410B9F9FUL, 0x7B8B0202UL,
<a name="l00141"></a>00141     0xA088D8D8UL, 0x114FF3F3UL, 0x3167CBCBUL, 0xC2462727UL, 0x27C06767UL, 0x90B4FCFCUL,
<a name="l00142"></a>00142     0x20283838UL, 0xF67F0404UL, 0x60784848UL, 0xFF2EE5E5UL, 0x96074C4CUL, 0x5C4B6565UL,
<a name="l00143"></a>00143     0xB1C72B2BUL, 0xAB6F8E8EUL, 0x9E0D4242UL, 0x9CBBF5F5UL, 0x52F2DBDBUL, 0x1BF34A4AUL,
<a name="l00144"></a>00144     0x5FA63D3DUL, 0x9359A4A4UL, 0x0ABCB9B9UL, 0xEF3AF9F9UL, 0x91EF1313UL, 0x85FE0808UL,
<a name="l00145"></a>00145     0x49019191UL, 0xEE611616UL, 0x2D7CDEDEUL, 0x4FB22121UL, 0x8F42B1B1UL, 0x3BDB7272UL,
<a name="l00146"></a>00146     0x47B82F2FUL, 0x8748BFBFUL, 0x6D2CAEAEUL, 0x46E3C0C0UL, 0xD6573C3CUL, 0x3E859A9AUL,
<a name="l00147"></a>00147     0x6929A9A9UL, 0x647D4F4FUL, 0x2A948181UL, 0xCE492E2EUL, 0xCB17C6C6UL, 0x2FCA6969UL,
<a name="l00148"></a>00148     0xFCC3BDBDUL, 0x975CA3A3UL, 0x055EE8E8UL, 0x7AD0EDEDUL, 0xAC87D1D1UL, 0x7F8E0505UL,
<a name="l00149"></a>00149     0xD5BA6464UL, 0x1AA8A5A5UL, 0x4BB72626UL, 0x0EB9BEBEUL, 0xA7608787UL, 0x5AF8D5D5UL,
<a name="l00150"></a>00150     0x28223636UL, 0x14111B1BUL, 0x3FDE7575UL, 0x2979D9D9UL, 0x88AAEEEEUL, 0x3C332D2DUL,
<a name="l00151"></a>00151     0x4C5F7979UL, 0x02B6B7B7UL, 0xB896CACAUL, 0xDA583535UL, 0xB09CC4C4UL, 0x17FC4343UL,
<a name="l00152"></a>00152     0x551A8484UL, 0x1FF64D4DUL, 0x8A1C5959UL, 0x7D38B2B2UL, 0x57AC3333UL, 0xC718CFCFUL,
<a name="l00153"></a>00153     0x8DF40606UL, 0x74695353UL, 0xB7749B9BUL, 0xC4F59797UL, 0x9F56ADADUL, 0x72DAE3E3UL,
<a name="l00154"></a>00154     0x7ED5EAEAUL, 0x154AF4F4UL, 0x229E8F8FUL, 0x12A2ABABUL, 0x584E6262UL, 0x07E85F5FUL,
<a name="l00155"></a>00155     0x99E51D1DUL, 0x34392323UL, 0x6EC1F6F6UL, 0x50446C6CUL, 0xDE5D3232UL, 0x68724646UL,
<a name="l00156"></a>00156     0x6526A0A0UL, 0xBC93CDCDUL, 0xDB03DADAUL, 0xF8C6BABAUL, 0xC8FA9E9EUL, 0xA882D6D6UL,
<a name="l00157"></a>00157     0x2BCF6E6EUL, 0x40507070UL, 0xDCEB8585UL, 0xFE750A0AUL, 0x328A9393UL, 0xA48DDFDFUL,
<a name="l00158"></a>00158     0xCA4C2929UL, 0x10141C1CUL, 0x2173D7D7UL, 0xF0CCB4B4UL, 0xD309D4D4UL, 0x5D108A8AUL,
<a name="l00159"></a>00159     0x0FE25151UL, 0x00000000UL, 0x6F9A1919UL, 0x9DE01A1AUL, 0x368F9494UL, 0x42E6C7C7UL,
<a name="l00160"></a>00160     0x4AECC9C9UL, 0x5EFDD2D2UL, 0xC1AB7F7FUL, 0xE0D8A8A8UL
<a name="l00161"></a>00161     }, {
<a name="l00162"></a>00162     0xBC75BC32UL, 0xECF3EC21UL, 0x20C62043UL, 0xB3F4B3C9UL, 0xDADBDA03UL, 0x027B028BUL,
<a name="l00163"></a>00163     0xE2FBE22BUL, 0x9EC89EFAUL, 0xC94AC9ECUL, 0xD4D3D409UL, 0x18E6186BUL, 0x1E6B1E9FUL,
<a name="l00164"></a>00164     0x9845980EUL, 0xB27DB238UL, 0xA6E8A6D2UL, 0x264B26B7UL, 0x3CD63C57UL, 0x9332938AUL,
<a name="l00165"></a>00165     0x82D882EEUL, 0x52FD5298UL, 0x7B377BD4UL, 0xBB71BB37UL, 0x5BF15B97UL, 0x47E14783UL,
<a name="l00166"></a>00166     0x2430243CUL, 0x510F51E2UL, 0xBAF8BAC6UL, 0x4A1B4AF3UL, 0xBF87BF48UL, 0x0DFA0D70UL,
<a name="l00167"></a>00167     0xB006B0B3UL, 0x753F75DEUL, 0xD25ED2FDUL, 0x7DBA7D20UL, 0x66AE6631UL, 0x3A5B3AA3UL,
<a name="l00168"></a>00168     0x598A591CUL, 0x00000000UL, 0xCDBCCD93UL, 0x1A9D1AE0UL, 0xAE6DAE2CUL, 0x7FC17FABUL,
<a name="l00169"></a>00169     0x2BB12BC7UL, 0xBE0EBEB9UL, 0xE080E0A0UL, 0x8A5D8A10UL, 0x3BD23B52UL, 0x64D564BAUL,
<a name="l00170"></a>00170     0xD8A0D888UL, 0xE784E7A5UL, 0x5F075FE8UL, 0x1B141B11UL, 0x2CB52CC2UL, 0xFC90FCB4UL,
<a name="l00171"></a>00171     0x312C3127UL, 0x80A38065UL, 0x73B2732AUL, 0x0C730C81UL, 0x794C795FUL, 0x6B546B41UL,
<a name="l00172"></a>00172     0x4B924B02UL, 0x53745369UL, 0x9436948FUL, 0x8351831FUL, 0x2A382A36UL, 0xC4B0C49CUL,
<a name="l00173"></a>00173     0x22BD22C8UL, 0xD55AD5F8UL, 0xBDFCBDC3UL, 0x48604878UL, 0xFF62FFCEUL, 0x4C964C07UL,
<a name="l00174"></a>00174     0x416C4177UL, 0xC742C7E6UL, 0xEBF7EB24UL, 0x1C101C14UL, 0x5D7C5D63UL, 0x36283622UL,
<a name="l00175"></a>00175     0x672767C0UL, 0xE98CE9AFUL, 0x441344F9UL, 0x149514EAUL, 0xF59CF5BBUL, 0xCFC7CF18UL,
<a name="l00176"></a>00176     0x3F243F2DUL, 0xC046C0E3UL, 0x723B72DBUL, 0x5470546CUL, 0x29CA294CUL, 0xF0E3F035UL,
<a name="l00177"></a>00177     0x088508FEUL, 0xC6CBC617UL, 0xF311F34FUL, 0x8CD08CE4UL, 0xA493A459UL, 0xCAB8CA96UL,
<a name="l00178"></a>00178     0x68A6683BUL, 0xB883B84DUL, 0x38203828UL, 0xE5FFE52EUL, 0xAD9FAD56UL, 0x0B770B84UL,
<a name="l00179"></a>00179     0xC8C3C81DUL, 0x99CC99FFUL, 0x580358EDUL, 0x196F199AUL, 0x0E080E0AUL, 0x95BF957EUL,
<a name="l00180"></a>00180     0x70407050UL, 0xF7E7F730UL, 0x6E2B6ECFUL, 0x1FE21F6EUL, 0xB579B53DUL, 0x090C090FUL,
<a name="l00181"></a>00181     0x61AA6134UL, 0x57825716UL, 0x9F419F0BUL, 0x9D3A9D80UL, 0x11EA1164UL, 0x25B925CDUL,
<a name="l00182"></a>00182     0xAFE4AFDDUL, 0x459A4508UL, 0xDFA4DF8DUL, 0xA397A35CUL, 0xEA7EEAD5UL, 0x35DA3558UL,
<a name="l00183"></a>00183     0xED7AEDD0UL, 0x431743FCUL, 0xF866F8CBUL, 0xFB94FBB1UL, 0x37A137D3UL, 0xFA1DFA40UL,
<a name="l00184"></a>00184     0xC23DC268UL, 0xB4F0B4CCUL, 0x32DE325DUL, 0x9CB39C71UL, 0x560B56E7UL, 0xE372E3DAUL,
<a name="l00185"></a>00185     0x87A78760UL, 0x151C151BUL, 0xF9EFF93AUL, 0x63D163BFUL, 0x345334A9UL, 0x9A3E9A85UL,
<a name="l00186"></a>00186     0xB18FB142UL, 0x7C337CD1UL, 0x8826889BUL, 0x3D5F3DA6UL, 0xA1ECA1D7UL, 0xE476E4DFUL,
<a name="l00187"></a>00187     0x812A8194UL, 0x91499101UL, 0x0F810FFBUL, 0xEE88EEAAUL, 0x16EE1661UL, 0xD721D773UL,
<a name="l00188"></a>00188     0x97C497F5UL, 0xA51AA5A8UL, 0xFEEBFE3FUL, 0x6DD96DB5UL, 0x78C578AEUL, 0xC539C56DUL,
<a name="l00189"></a>00189     0x1D991DE5UL, 0x76CD76A4UL, 0x3EAD3EDCUL, 0xCB31CB67UL, 0xB68BB647UL, 0xEF01EF5BUL,
<a name="l00190"></a>00190     0x1218121EUL, 0x602360C5UL, 0x6ADD6AB0UL, 0x4D1F4DF6UL, 0xCE4ECEE9UL, 0xDE2DDE7CUL,
<a name="l00191"></a>00191     0x55F9559DUL, 0x7E487E5AUL, 0x214F21B2UL, 0x03F2037AUL, 0xA065A026UL, 0x5E8E5E19UL,
<a name="l00192"></a>00192     0x5A785A66UL, 0x655C654BUL, 0x6258624EUL, 0xFD19FD45UL, 0x068D06F4UL, 0x40E54086UL,
<a name="l00193"></a>00193     0xF298F2BEUL, 0x335733ACUL, 0x17671790UL, 0x057F058EUL, 0xE805E85EUL, 0x4F644F7DUL,
<a name="l00194"></a>00194     0x89AF896AUL, 0x10631095UL, 0x74B6742FUL, 0x0AFE0A75UL, 0x5CF55C92UL, 0x9BB79B74UL,
<a name="l00195"></a>00195     0x2D3C2D33UL, 0x30A530D6UL, 0x2ECE2E49UL, 0x49E94989UL, 0x46684672UL, 0x77447755UL,
<a name="l00196"></a>00196     0xA8E0A8D8UL, 0x964D9604UL, 0x284328BDUL, 0xA969A929UL, 0xD929D979UL, 0x862E8691UL,
<a name="l00197"></a>00197     0xD1ACD187UL, 0xF415F44AUL, 0x8D598D15UL, 0xD6A8D682UL, 0xB90AB9BCUL, 0x429E420DUL,
<a name="l00198"></a>00198     0xF66EF6C1UL, 0x2F472FB8UL, 0xDDDFDD06UL, 0x23342339UL, 0xCC35CC62UL, 0xF16AF1C4UL,
<a name="l00199"></a>00199     0xC1CFC112UL, 0x85DC85EBUL, 0x8F228F9EUL, 0x71C971A1UL, 0x90C090F0UL, 0xAA9BAA53UL,
<a name="l00200"></a>00200     0x018901F1UL, 0x8BD48BE1UL, 0x4EED4E8CUL, 0x8EAB8E6FUL, 0xAB12ABA2UL, 0x6FA26F3EUL,
<a name="l00201"></a>00201     0xE60DE654UL, 0xDB52DBF2UL, 0x92BB927BUL, 0xB702B7B6UL, 0x692F69CAUL, 0x39A939D9UL,
<a name="l00202"></a>00202     0xD3D7D30CUL, 0xA761A723UL, 0xA21EA2ADUL, 0xC3B4C399UL, 0x6C506C44UL, 0x07040705UL,
<a name="l00203"></a>00203     0x04F6047FUL, 0x27C22746UL, 0xAC16ACA7UL, 0xD025D076UL, 0x50865013UL, 0xDC56DCF7UL,
<a name="l00204"></a>00204     0x8455841AUL, 0xE109E151UL, 0x7ABE7A25UL, 0x139113EFUL
<a name="l00205"></a>00205     }, {
<a name="l00206"></a>00206     0xD939A9D9UL, 0x90176790UL, 0x719CB371UL, 0xD2A6E8D2UL, 0x05070405UL, 0x9852FD98UL,
<a name="l00207"></a>00207     0x6580A365UL, 0xDFE476DFUL, 0x08459A08UL, 0x024B9202UL, 0xA0E080A0UL, 0x665A7866UL,
<a name="l00208"></a>00208     0xDDAFE4DDUL, 0xB06ADDB0UL, 0xBF63D1BFUL, 0x362A3836UL, 0x54E60D54UL, 0x4320C643UL,
<a name="l00209"></a>00209     0x62CC3562UL, 0xBEF298BEUL, 0x1E12181EUL, 0x24EBF724UL, 0xD7A1ECD7UL, 0x77416C77UL,
<a name="l00210"></a>00210     0xBD2843BDUL, 0x32BC7532UL, 0xD47B37D4UL, 0x9B88269BUL, 0x700DFA70UL, 0xF94413F9UL,
<a name="l00211"></a>00211     0xB1FB94B1UL, 0x5A7E485AUL, 0x7A03F27AUL, 0xE48CD0E4UL, 0x47B68B47UL, 0x3C24303CUL,
<a name="l00212"></a>00212     0xA5E784A5UL, 0x416B5441UL, 0x06DDDF06UL, 0xC56023C5UL, 0x45FD1945UL, 0xA33A5BA3UL,
<a name="l00213"></a>00213     0x68C23D68UL, 0x158D5915UL, 0x21ECF321UL, 0x3166AE31UL, 0x3E6FA23EUL, 0x16578216UL,
<a name="l00214"></a>00214     0x95106395UL, 0x5BEF015BUL, 0x4DB8834DUL, 0x91862E91UL, 0xB56DD9B5UL, 0x1F83511FUL,
<a name="l00215"></a>00215     0x53AA9B53UL, 0x635D7C63UL, 0x3B68A63BUL, 0x3FFEEB3FUL, 0xD630A5D6UL, 0x257ABE25UL,
<a name="l00216"></a>00216     0xA7AC16A7UL, 0x0F090C0FUL, 0x35F0E335UL, 0x23A76123UL, 0xF090C0F0UL, 0xAFE98CAFUL,
<a name="l00217"></a>00217     0x809D3A80UL, 0x925CF592UL, 0x810C7381UL, 0x27312C27UL, 0x76D02576UL, 0xE7560BE7UL,
<a name="l00218"></a>00218     0x7B92BB7BUL, 0xE9CE4EE9UL, 0xF10189F1UL, 0x9F1E6B9FUL, 0xA93453A9UL, 0xC4F16AC4UL,
<a name="l00219"></a>00219     0x99C3B499UL, 0x975BF197UL, 0x8347E183UL, 0x6B18E66BUL, 0xC822BDC8UL, 0x0E98450EUL,
<a name="l00220"></a>00220     0x6E1FE26EUL, 0xC9B3F4C9UL, 0x2F74B62FUL, 0xCBF866CBUL, 0xFF99CCFFUL, 0xEA1495EAUL,
<a name="l00221"></a>00221     0xED5803EDUL, 0xF7DC56F7UL, 0xE18BD4E1UL, 0x1B151C1BUL, 0xADA21EADUL, 0x0CD3D70CUL,
<a name="l00222"></a>00222     0x2BE2FB2BUL, 0x1DC8C31DUL, 0x195E8E19UL, 0xC22CB5C2UL, 0x8949E989UL, 0x12C1CF12UL,
<a name="l00223"></a>00223     0x7E95BF7EUL, 0x207DBA20UL, 0x6411EA64UL, 0x840B7784UL, 0x6DC5396DUL, 0x6A89AF6AUL,
<a name="l00224"></a>00224     0xD17C33D1UL, 0xA171C9A1UL, 0xCEFF62CEUL, 0x37BB7137UL, 0xFB0F81FBUL, 0x3DB5793DUL,
<a name="l00225"></a>00225     0x51E10951UL, 0xDC3EADDCUL, 0x2D3F242DUL, 0xA476CDA4UL, 0x9D55F99DUL, 0xEE82D8EEUL,
<a name="l00226"></a>00226     0x8640E586UL, 0xAE78C5AEUL, 0xCD25B9CDUL, 0x04964D04UL, 0x55774455UL, 0x0A0E080AUL,
<a name="l00227"></a>00227     0x13508613UL, 0x30F7E730UL, 0xD337A1D3UL, 0x40FA1D40UL, 0x3461AA34UL, 0x8C4EED8CUL,
<a name="l00228"></a>00228     0xB3B006B3UL, 0x6C54706CUL, 0x2A73B22AUL, 0x523BD252UL, 0x0B9F410BUL, 0x8B027B8BUL,
<a name="l00229"></a>00229     0x88D8A088UL, 0x4FF3114FUL, 0x67CB3167UL, 0x4627C246UL, 0xC06727C0UL, 0xB4FC90B4UL,
<a name="l00230"></a>00230     0x28382028UL, 0x7F04F67FUL, 0x78486078UL, 0x2EE5FF2EUL, 0x074C9607UL, 0x4B655C4BUL,
<a name="l00231"></a>00231     0xC72BB1C7UL, 0x6F8EAB6FUL, 0x0D429E0DUL, 0xBBF59CBBUL, 0xF2DB52F2UL, 0xF34A1BF3UL,
<a name="l00232"></a>00232     0xA63D5FA6UL, 0x59A49359UL, 0xBCB90ABCUL, 0x3AF9EF3AUL, 0xEF1391EFUL, 0xFE0885FEUL,
<a name="l00233"></a>00233     0x01914901UL, 0x6116EE61UL, 0x7CDE2D7CUL, 0xB2214FB2UL, 0x42B18F42UL, 0xDB723BDBUL,
<a name="l00234"></a>00234     0xB82F47B8UL, 0x48BF8748UL, 0x2CAE6D2CUL, 0xE3C046E3UL, 0x573CD657UL, 0x859A3E85UL,
<a name="l00235"></a>00235     0x29A96929UL, 0x7D4F647DUL, 0x94812A94UL, 0x492ECE49UL, 0x17C6CB17UL, 0xCA692FCAUL,
<a name="l00236"></a>00236     0xC3BDFCC3UL, 0x5CA3975CUL, 0x5EE8055EUL, 0xD0ED7AD0UL, 0x87D1AC87UL, 0x8E057F8EUL,
<a name="l00237"></a>00237     0xBA64D5BAUL, 0xA8A51AA8UL, 0xB7264BB7UL, 0xB9BE0EB9UL, 0x6087A760UL, 0xF8D55AF8UL,
<a name="l00238"></a>00238     0x22362822UL, 0x111B1411UL, 0xDE753FDEUL, 0x79D92979UL, 0xAAEE88AAUL, 0x332D3C33UL,
<a name="l00239"></a>00239     0x5F794C5FUL, 0xB6B702B6UL, 0x96CAB896UL, 0x5835DA58UL, 0x9CC4B09CUL, 0xFC4317FCUL,
<a name="l00240"></a>00240     0x1A84551AUL, 0xF64D1FF6UL, 0x1C598A1CUL, 0x38B27D38UL, 0xAC3357ACUL, 0x18CFC718UL,
<a name="l00241"></a>00241     0xF4068DF4UL, 0x69537469UL, 0x749BB774UL, 0xF597C4F5UL, 0x56AD9F56UL, 0xDAE372DAUL,
<a name="l00242"></a>00242     0xD5EA7ED5UL, 0x4AF4154AUL, 0x9E8F229EUL, 0xA2AB12A2UL, 0x4E62584EUL, 0xE85F07E8UL,
<a name="l00243"></a>00243     0xE51D99E5UL, 0x39233439UL, 0xC1F66EC1UL, 0x446C5044UL, 0x5D32DE5DUL, 0x72466872UL,
<a name="l00244"></a>00244     0x26A06526UL, 0x93CDBC93UL, 0x03DADB03UL, 0xC6BAF8C6UL, 0xFA9EC8FAUL, 0x82D6A882UL,
<a name="l00245"></a>00245     0xCF6E2BCFUL, 0x50704050UL, 0xEB85DCEBUL, 0x750AFE75UL, 0x8A93328AUL, 0x8DDFA48DUL,
<a name="l00246"></a>00246     0x4C29CA4CUL, 0x141C1014UL, 0x73D72173UL, 0xCCB4F0CCUL, 0x09D4D309UL, 0x108A5D10UL,
<a name="l00247"></a>00247     0xE2510FE2UL, 0x00000000UL, 0x9A196F9AUL, 0xE01A9DE0UL, 0x8F94368FUL, 0xE6C742E6UL,
<a name="l00248"></a>00248     0xECC94AECUL, 0xFDD25EFDUL, 0xAB7FC1ABUL, 0xD8A8E0D8UL }
<a name="l00249"></a>00249 };
<a name="l00250"></a>00250 
<a name="l00251"></a>00251 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> POLY_TO_EXP[255] = {
<a name="l00252"></a>00252     0x00, 0x01, 0x17, 0x02, 0x2E, 0x18, 0x53, 0x03, 0x6A, 0x2F, 0x93, 0x19,
<a name="l00253"></a>00253     0x34, 0x54, 0x45, 0x04, 0x5C, 0x6B, 0xB6, 0x30, 0xA6, 0x94, 0x4B, 0x1A,
<a name="l00254"></a>00254     0x8C, 0x35, 0x81, 0x55, 0xAA, 0x46, 0x0D, 0x05, 0x24, 0x5D, 0x87, 0x6C,
<a name="l00255"></a>00255     0x9B, 0xB7, 0xC1, 0x31, 0x2B, 0xA7, 0xA3, 0x95, 0x98, 0x4C, 0xCA, 0x1B,
<a name="l00256"></a>00256     0xE6, 0x8D, 0x73, 0x36, 0xCD, 0x82, 0x12, 0x56, 0x62, 0xAB, 0xF0, 0x47,
<a name="l00257"></a>00257     0x4F, 0x0E, 0xBD, 0x06, 0xD4, 0x25, 0xD2, 0x5E, 0x27, 0x88, 0x66, 0x6D,
<a name="l00258"></a>00258     0xD6, 0x9C, 0x79, 0xB8, 0x08, 0xC2, 0xDF, 0x32, 0x68, 0x2C, 0xFD, 0xA8,
<a name="l00259"></a>00259     0x8A, 0xA4, 0x5A, 0x96, 0x29, 0x99, 0x22, 0x4D, 0x60, 0xCB, 0xE4, 0x1C,
<a name="l00260"></a>00260     0x7B, 0xE7, 0x3B, 0x8E, 0x9E, 0x74, 0xF4, 0x37, 0xD8, 0xCE, 0xF9, 0x83,
<a name="l00261"></a>00261     0x6F, 0x13, 0xB2, 0x57, 0xE1, 0x63, 0xDC, 0xAC, 0xC4, 0xF1, 0xAF, 0x48,
<a name="l00262"></a>00262     0x0A, 0x50, 0x42, 0x0F, 0xBA, 0xBE, 0xC7, 0x07, 0xDE, 0xD5, 0x78, 0x26,
<a name="l00263"></a>00263     0x65, 0xD3, 0xD1, 0x5F, 0xE3, 0x28, 0x21, 0x89, 0x59, 0x67, 0xFC, 0x6E,
<a name="l00264"></a>00264     0xB1, 0xD7, 0xF8, 0x9D, 0xF3, 0x7A, 0x3A, 0xB9, 0xC6, 0x09, 0x41, 0xC3,
<a name="l00265"></a>00265     0xAE, 0xE0, 0xDB, 0x33, 0x44, 0x69, 0x92, 0x2D, 0x52, 0xFE, 0x16, 0xA9,
<a name="l00266"></a>00266     0x0C, 0x8B, 0x80, 0xA5, 0x4A, 0x5B, 0xB5, 0x97, 0xC9, 0x2A, 0xA2, 0x9A,
<a name="l00267"></a>00267     0xC0, 0x23, 0x86, 0x4E, 0xBC, 0x61, 0xEF, 0xCC, 0x11, 0xE5, 0x72, 0x1D,
<a name="l00268"></a>00268     0x3D, 0x7C, 0xEB, 0xE8, 0xE9, 0x3C, 0xEA, 0x8F, 0x7D, 0x9F, 0xEC, 0x75,
<a name="l00269"></a>00269     0x1E, 0xF5, 0x3E, 0x38, 0xF6, 0xD9, 0x3F, 0xCF, 0x76, 0xFA, 0x1F, 0x84,
<a name="l00270"></a>00270     0xA0, 0x70, 0xED, 0x14, 0x90, 0xB3, 0x7E, 0x58, 0xFB, 0xE2, 0x20, 0x64,
<a name="l00271"></a>00271     0xD0, 0xDD, 0x77, 0xAD, 0xDA, 0xC5, 0x40, 0xF2, 0x39, 0xB0, 0xF7, 0x49,
<a name="l00272"></a>00272     0xB4, 0x0B, 0x7F, 0x51, 0x15, 0x43, 0x91, 0x10, 0x71, 0xBB, 0xEE, 0xBF,
<a name="l00273"></a>00273     0x85, 0xC8, 0xA1
<a name="l00274"></a>00274 };
<a name="l00275"></a>00275 
<a name="l00276"></a>00276 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> EXP_TO_POLY[492] = {
<a name="l00277"></a>00277     0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D, 0x9A, 0x79, 0xF2,
<a name="l00278"></a>00278     0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC, 0xF5, 0xA7, 0x03,
<a name="l00279"></a>00279     0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3, 0x8B, 0x5B, 0xB6,
<a name="l00280"></a>00280     0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52, 0xA4, 0x05, 0x0A,
<a name="l00281"></a>00281     0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0, 0xED, 0x97, 0x63,
<a name="l00282"></a>00282     0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1, 0x0F, 0x1E, 0x3C,
<a name="l00283"></a>00283     0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A, 0xF4, 0xA5, 0x07,
<a name="l00284"></a>00284     0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11, 0x22, 0x44, 0x88,
<a name="l00285"></a>00285     0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51, 0xA2, 0x09, 0x12,
<a name="l00286"></a>00286     0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66, 0xCC, 0xD5, 0xE7,
<a name="l00287"></a>00287     0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB, 0x1B, 0x36, 0x6C,
<a name="l00288"></a>00288     0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19, 0x32, 0x64, 0xC8,
<a name="l00289"></a>00289     0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D, 0x5A, 0xB4, 0x25,
<a name="l00290"></a>00290     0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56, 0xAC, 0x15, 0x2A,
<a name="l00291"></a>00291     0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE, 0x91, 0x6F, 0xDE,
<a name="l00292"></a>00292     0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9, 0x3F, 0x7E, 0xFC,
<a name="l00293"></a>00293     0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE, 0xB1, 0x2F, 0x5E,
<a name="l00294"></a>00294     0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41, 0x82, 0x49, 0x92,
<a name="l00295"></a>00295     0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E, 0x71, 0xE2, 0x89,
<a name="l00296"></a>00296     0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB, 0xDB, 0xFB, 0xBB,
<a name="l00297"></a>00297     0x3B, 0x76, 0xEC, 0x95, 0x67, 0xCE, 0xD1, 0xEF, 0x93, 0x6B, 0xD6, 0xE1,
<a name="l00298"></a>00298     0x8F, 0x53, 0xA6, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D,
<a name="l00299"></a>00299     0x9A, 0x79, 0xF2, 0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC,
<a name="l00300"></a>00300     0xF5, 0xA7, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3,
<a name="l00301"></a>00301     0x8B, 0x5B, 0xB6, 0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52,
<a name="l00302"></a>00302     0xA4, 0x05, 0x0A, 0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0,
<a name="l00303"></a>00303     0xED, 0x97, 0x63, 0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1,
<a name="l00304"></a>00304     0x0F, 0x1E, 0x3C, 0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A,
<a name="l00305"></a>00305     0xF4, 0xA5, 0x07, 0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11,
<a name="l00306"></a>00306     0x22, 0x44, 0x88, 0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51,
<a name="l00307"></a>00307     0xA2, 0x09, 0x12, 0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66,
<a name="l00308"></a>00308     0xCC, 0xD5, 0xE7, 0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB,
<a name="l00309"></a>00309     0x1B, 0x36, 0x6C, 0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19,
<a name="l00310"></a>00310     0x32, 0x64, 0xC8, 0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D,
<a name="l00311"></a>00311     0x5A, 0xB4, 0x25, 0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56,
<a name="l00312"></a>00312     0xAC, 0x15, 0x2A, 0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE,
<a name="l00313"></a>00313     0x91, 0x6F, 0xDE, 0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9,
<a name="l00314"></a>00314     0x3F, 0x7E, 0xFC, 0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE,
<a name="l00315"></a>00315     0xB1, 0x2F, 0x5E, 0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41,
<a name="l00316"></a>00316     0x82, 0x49, 0x92, 0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E,
<a name="l00317"></a>00317     0x71, 0xE2, 0x89, 0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB
<a name="l00318"></a>00318 };
<a name="l00319"></a>00319 
<a name="l00320"></a>00320 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> CALC_SB_TBL[512] = {
<a name="l00321"></a>00321     0xA9, 0x75, 0x67, 0xF3, 0xB3, 0xC6, 0xE8, 0xF4,
<a name="l00322"></a>00322     0x04, 0xDB, 0xFD, 0x7B, 0xA3, 0xFB, 0x76, 0xC8,
<a name="l00323"></a>00323     0x9A, 0x4A, 0x92, 0xD3, 0x80, 0xE6, 0x78, 0x6B,
<a name="l00324"></a>00324     0xE4, 0x45, 0xDD, 0x7D, 0xD1, 0xE8, 0x38, 0x4B,
<a name="l00325"></a>00325     0x0D, 0xD6, 0xC6, 0x32, 0x35, 0xD8, 0x98, 0xFD,
<a name="l00326"></a>00326     0x18, 0x37, 0xF7, 0x71, 0xEC, 0xF1, 0x6C, 0xE1,
<a name="l00327"></a>00327     0x43, 0x30, 0x75, 0x0F, 0x37, 0xF8, 0x26, 0x1B,
<a name="l00328"></a>00328     0xFA, 0x87, 0x13, 0xFA, 0x94, 0x06, 0x48, 0x3F,
<a name="l00329"></a>00329     0xF2, 0x5E, 0xD0, 0xBA, 0x8B, 0xAE, 0x30, 0x5B,
<a name="l00330"></a>00330     0x84, 0x8A, 0x54, 0x00, 0xDF, 0xBC, 0x23, 0x9D,
<a name="l00331"></a>00331     0x19, 0x6D, 0x5B, 0xC1, 0x3D, 0xB1, 0x59, 0x0E,
<a name="l00332"></a>00332     0xF3, 0x80, 0xAE, 0x5D, 0xA2, 0xD2, 0x82, 0xD5,
<a name="l00333"></a>00333     0x63, 0xA0, 0x01, 0x84, 0x83, 0x07, 0x2E, 0x14,
<a name="l00334"></a>00334     0xD9, 0xB5, 0x51, 0x90, 0x9B, 0x2C, 0x7C, 0xA3,
<a name="l00335"></a>00335     0xA6, 0xB2, 0xEB, 0x73, 0xA5, 0x4C, 0xBE, 0x54,
<a name="l00336"></a>00336     0x16, 0x92, 0x0C, 0x74, 0xE3, 0x36, 0x61, 0x51,
<a name="l00337"></a>00337     0xC0, 0x38, 0x8C, 0xB0, 0x3A, 0xBD, 0xF5, 0x5A,
<a name="l00338"></a>00338     0x73, 0xFC, 0x2C, 0x60, 0x25, 0x62, 0x0B, 0x96,
<a name="l00339"></a>00339     0xBB, 0x6C, 0x4E, 0x42, 0x89, 0xF7, 0x6B, 0x10,
<a name="l00340"></a>00340     0x53, 0x7C, 0x6A, 0x28, 0xB4, 0x27, 0xF1, 0x8C,
<a name="l00341"></a>00341     0xE1, 0x13, 0xE6, 0x95, 0xBD, 0x9C, 0x45, 0xC7,
<a name="l00342"></a>00342     0xE2, 0x24, 0xF4, 0x46, 0xB6, 0x3B, 0x66, 0x70,
<a name="l00343"></a>00343     0xCC, 0xCA, 0x95, 0xE3, 0x03, 0x85, 0x56, 0xCB,
<a name="l00344"></a>00344     0xD4, 0x11, 0x1C, 0xD0, 0x1E, 0x93, 0xD7, 0xB8,
<a name="l00345"></a>00345     0xFB, 0xA6, 0xC3, 0x83, 0x8E, 0x20, 0xB5, 0xFF,
<a name="l00346"></a>00346     0xE9, 0x9F, 0xCF, 0x77, 0xBF, 0xC3, 0xBA, 0xCC,
<a name="l00347"></a>00347     0xEA, 0x03, 0x77, 0x6F, 0x39, 0x08, 0xAF, 0xBF,
<a name="l00348"></a>00348     0x33, 0x40, 0xC9, 0xE7, 0x62, 0x2B, 0x71, 0xE2,
<a name="l00349"></a>00349     0x81, 0x79, 0x79, 0x0C, 0x09, 0xAA, 0xAD, 0x82,
<a name="l00350"></a>00350     0x24, 0x41, 0xCD, 0x3A, 0xF9, 0xEA, 0xD8, 0xB9,
<a name="l00351"></a>00351     0xE5, 0xE4, 0xC5, 0x9A, 0xB9, 0xA4, 0x4D, 0x97,
<a name="l00352"></a>00352     0x44, 0x7E, 0x08, 0xDA, 0x86, 0x7A, 0xE7, 0x17,
<a name="l00353"></a>00353     0xA1, 0x66, 0x1D, 0x94, 0xAA, 0xA1, 0xED, 0x1D,
<a name="l00354"></a>00354     0x06, 0x3D, 0x70, 0xF0, 0xB2, 0xDE, 0xD2, 0xB3,
<a name="l00355"></a>00355     0x41, 0x0B, 0x7B, 0x72, 0xA0, 0xA7, 0x11, 0x1C,
<a name="l00356"></a>00356     0x31, 0xEF, 0xC2, 0xD1, 0x27, 0x53, 0x90, 0x3E,
<a name="l00357"></a>00357     0x20, 0x8F, 0xF6, 0x33, 0x60, 0x26, 0xFF, 0x5F,
<a name="l00358"></a>00358     0x96, 0xEC, 0x5C, 0x76, 0xB1, 0x2A, 0xAB, 0x49,
<a name="l00359"></a>00359     0x9E, 0x81, 0x9C, 0x88, 0x52, 0xEE, 0x1B, 0x21,
<a name="l00360"></a>00360     0x5F, 0xC4, 0x93, 0x1A, 0x0A, 0xEB, 0xEF, 0xD9,
<a name="l00361"></a>00361     0x91, 0xC5, 0x85, 0x39, 0x49, 0x99, 0xEE, 0xCD,
<a name="l00362"></a>00362     0x2D, 0xAD, 0x4F, 0x31, 0x8F, 0x8B, 0x3B, 0x01,
<a name="l00363"></a>00363     0x47, 0x18, 0x87, 0x23, 0x6D, 0xDD, 0x46, 0x1F,
<a name="l00364"></a>00364     0xD6, 0x4E, 0x3E, 0x2D, 0x69, 0xF9, 0x64, 0x48,
<a name="l00365"></a>00365     0x2A, 0x4F, 0xCE, 0xF2, 0xCB, 0x65, 0x2F, 0x8E,
<a name="l00366"></a>00366     0xFC, 0x78, 0x97, 0x5C, 0x05, 0x58, 0x7A, 0x19,
<a name="l00367"></a>00367     0xAC, 0x8D, 0x7F, 0xE5, 0xD5, 0x98, 0x1A, 0x57,
<a name="l00368"></a>00368     0x4B, 0x67, 0x0E, 0x7F, 0xA7, 0x05, 0x5A, 0x64,
<a name="l00369"></a>00369     0x28, 0xAF, 0x14, 0x63, 0x3F, 0xB6, 0x29, 0xFE,
<a name="l00370"></a>00370     0x88, 0xF5, 0x3C, 0xB7, 0x4C, 0x3C, 0x02, 0xA5,
<a name="l00371"></a>00371     0xB8, 0xCE, 0xDA, 0xE9, 0xB0, 0x68, 0x17, 0x44,
<a name="l00372"></a>00372     0x55, 0xE0, 0x1F, 0x4D, 0x8A, 0x43, 0x7D, 0x69,
<a name="l00373"></a>00373     0x57, 0x29, 0xC7, 0x2E, 0x8D, 0xAC, 0x74, 0x15,
<a name="l00374"></a>00374     0xB7, 0x59, 0xC4, 0xA8, 0x9F, 0x0A, 0x72, 0x9E,
<a name="l00375"></a>00375     0x7E, 0x6E, 0x15, 0x47, 0x22, 0xDF, 0x12, 0x34,
<a name="l00376"></a>00376     0x58, 0x35, 0x07, 0x6A, 0x99, 0xCF, 0x34, 0xDC,
<a name="l00377"></a>00377     0x6E, 0x22, 0x50, 0xC9, 0xDE, 0xC0, 0x68, 0x9B,
<a name="l00378"></a>00378     0x65, 0x89, 0xBC, 0xD4, 0xDB, 0xED, 0xF8, 0xAB,
<a name="l00379"></a>00379     0xC8, 0x12, 0xA8, 0xA2, 0x2B, 0x0D, 0x40, 0x52,
<a name="l00380"></a>00380     0xDC, 0xBB, 0xFE, 0x02, 0x32, 0x2F, 0xA4, 0xA9,
<a name="l00381"></a>00381     0xCA, 0xD7, 0x10, 0x61, 0x21, 0x1E, 0xF0, 0xB4,
<a name="l00382"></a>00382     0xD3, 0x50, 0x5D, 0x04, 0x0F, 0xF6, 0x00, 0xC2,
<a name="l00383"></a>00383     0x6F, 0x16, 0x9D, 0x25, 0x36, 0x86, 0x42, 0x56,
<a name="l00384"></a>00384     0x4A, 0x55, 0x5E, 0x09, 0xC1, 0xBE, 0xE0, 0x91
<a name="l00385"></a>00385 };
<a name="l00386"></a>00386 
<a name="l00387"></a>00387 <span class="preprocessor">#define CALC_S(a, b, c, d, i, w, x, y, z) \</span>
<a name="l00388"></a>00388 <span class="preprocessor">    if (src_key[i]) {                       \</span>
<a name="l00389"></a>00389 <span class="preprocessor">        tmp = POLY_TO_EXP[src_key[i] - 1];  \</span>
<a name="l00390"></a>00390 <span class="preprocessor">        (a) ^= EXP_TO_POLY[tmp + (w)];      \</span>
<a name="l00391"></a>00391 <span class="preprocessor">        (b) ^= EXP_TO_POLY[tmp + (x)];      \</span>
<a name="l00392"></a>00392 <span class="preprocessor">        (c) ^= EXP_TO_POLY[tmp + (y)];      \</span>
<a name="l00393"></a>00393 <span class="preprocessor">        (d) ^= EXP_TO_POLY[tmp + (z)];      \</span>
<a name="l00394"></a>00394 <span class="preprocessor">    }</span>
<a name="l00395"></a>00395 <span class="preprocessor"></span>
<a name="l00396"></a>00396 <span class="preprocessor">#define CALC_SB_2(i, a, b) \</span>
<a name="l00397"></a>00397 <span class="preprocessor">   S[0][i] = MDS[0][Q0[(a) ^ sa] ^ se]; \</span>
<a name="l00398"></a>00398 <span class="preprocessor">   S[1][i] = MDS[1][Q0[(b) ^ sb] ^ sf]; \</span>
<a name="l00399"></a>00399 <span class="preprocessor">   S[2][i] = MDS[2][Q1[(a) ^ sc] ^ sg]; \</span>
<a name="l00400"></a>00400 <span class="preprocessor">   S[3][i] = MDS[3][Q1[(b) ^ sd] ^ sh]</span>
<a name="l00401"></a>00401 <span class="preprocessor"></span>
<a name="l00402"></a>00402 <span class="preprocessor">#define CALC_SB192_2(i, a, b) \</span>
<a name="l00403"></a>00403 <span class="preprocessor">   S[0][i] = MDS[0][Q0[Q0[(b) ^ sa] ^ se] ^ si]; \</span>
<a name="l00404"></a>00404 <span class="preprocessor">   S[1][i] = MDS[1][Q0[Q1[(b) ^ sb] ^ sf] ^ sj]; \</span>
<a name="l00405"></a>00405 <span class="preprocessor">   S[2][i] = MDS[2][Q1[Q0[(a) ^ sc] ^ sg] ^ sk]; \</span>
<a name="l00406"></a>00406 <span class="preprocessor">   S[3][i] = MDS[3][Q1[Q1[(a) ^ sd] ^ sh] ^ sl];</span>
<a name="l00407"></a>00407 <span class="preprocessor"></span>
<a name="l00408"></a>00408 <span class="preprocessor">#define CALC_SB256_2(i, a, b) \</span>
<a name="l00409"></a>00409 <span class="preprocessor">   S[0][i] = MDS[0][Q0[Q0[Q1[(b) ^ sa] ^ se] ^ si] ^ sm]; \</span>
<a name="l00410"></a>00410 <span class="preprocessor">   S[1][i] = MDS[1][Q0[Q1[Q1[(a) ^ sb] ^ sf] ^ sj] ^ sn]; \</span>
<a name="l00411"></a>00411 <span class="preprocessor">   S[2][i] = MDS[2][Q1[Q0[Q0[(a) ^ sc] ^ sg] ^ sk] ^ so]; \</span>
<a name="l00412"></a>00412 <span class="preprocessor">   S[3][i] = MDS[3][Q1[Q1[Q0[(b) ^ sd] ^ sh] ^ sl] ^ sp];</span>
<a name="l00413"></a>00413 <span class="preprocessor"></span>
<a name="l00414"></a>00414 <span class="preprocessor">#define CALC_K_2(a, b, c, d, j)                     \</span>
<a name="l00415"></a>00415 <span class="preprocessor">    MDS[0][Q0[a ^ src_key[(j) + 8]] ^ src_key[j]] ^         \</span>
<a name="l00416"></a>00416 <span class="preprocessor">    MDS[1][Q0[b ^ src_key[(j) + 9]] ^ src_key[(j) + 1]] ^   \</span>
<a name="l00417"></a>00417 <span class="preprocessor">    MDS[2][Q1[c ^ src_key[(j) + 10]] ^ src_key[(j) + 2]] ^  \</span>
<a name="l00418"></a>00418 <span class="preprocessor">    MDS[3][Q1[d ^ src_key[(j) + 11]] ^ src_key[(j) + 3]]</span>
<a name="l00419"></a>00419 <span class="preprocessor"></span>
<a name="l00420"></a>00420 <span class="preprocessor">#define CALC_K(a, j, k, l, m, n)    \</span>
<a name="l00421"></a>00421 <span class="preprocessor">    x = CALC_K_2 (k, l, k, l, 0);   \</span>
<a name="l00422"></a>00422 <span class="preprocessor">    y = CALC_K_2 (m, n, m, n, 4);   \</span>
<a name="l00423"></a>00423 <span class="preprocessor">    y = __rol32(y, 8);              \</span>
<a name="l00424"></a>00424 <span class="preprocessor">    x += y; y += x; a[j] = x;       \</span>
<a name="l00425"></a>00425 <span class="preprocessor">    a[(j) + 1] = __rol32(y, 9)</span>
<a name="l00426"></a>00426 <span class="preprocessor"></span>
<a name="l00427"></a>00427 <span class="preprocessor">#define CALC_K192_2(a, b, c, d, j)                              \</span>
<a name="l00428"></a>00428 <span class="preprocessor">    CALC_K_2 (                                                  \</span>
<a name="l00429"></a>00429 <span class="preprocessor">        Q0[a ^ src_key[(j) + 16]], Q1[b ^ src_key[(j) + 17]],   \</span>
<a name="l00430"></a>00430 <span class="preprocessor">        Q0[c ^ src_key[(j) + 18]], Q1[d ^ src_key[(j) + 19]], j)</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span>
<a name="l00432"></a>00432 <span class="preprocessor">#define CALC_K192(a, j, k, l, m, n)     \</span>
<a name="l00433"></a>00433 <span class="preprocessor">    x = CALC_K192_2 (l, l, k, k, 0);    \</span>
<a name="l00434"></a>00434 <span class="preprocessor">    y = CALC_K192_2 (n, n, m, m, 4);    \</span>
<a name="l00435"></a>00435 <span class="preprocessor">    y = __rol32(y, 8);                  \</span>
<a name="l00436"></a>00436 <span class="preprocessor">    x += y; y += x; a[j] = x;           \</span>
<a name="l00437"></a>00437 <span class="preprocessor">    a[(j) + 1] = __rol32(y, 9)</span>
<a name="l00438"></a>00438 <span class="preprocessor"></span>
<a name="l00439"></a>00439 <span class="preprocessor">#define CALC_K256_2(a, b, j)                                    \</span>
<a name="l00440"></a>00440 <span class="preprocessor">    CALC_K192_2 (                                               \</span>
<a name="l00441"></a>00441 <span class="preprocessor">        Q1[b ^ src_key[(j) + 24]], Q1[a ^ src_key[(j) + 25]],   \</span>
<a name="l00442"></a>00442 <span class="preprocessor">        Q0[a ^ src_key[(j) + 26]], Q0[b ^ src_key[(j) + 27]], j)</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span>
<a name="l00444"></a>00444 <span class="preprocessor">#define CALC_K256(a, j, k, l, m, n) \</span>
<a name="l00445"></a>00445 <span class="preprocessor">    x = CALC_K256_2 (k, l, 0);      \</span>
<a name="l00446"></a>00446 <span class="preprocessor">    y = CALC_K256_2 (m, n, 4);      \</span>
<a name="l00447"></a>00447 <span class="preprocessor">    y = __rol32(y, 8);              \</span>
<a name="l00448"></a>00448 <span class="preprocessor">    x += y; y += x; a[j] = x;       \</span>
<a name="l00449"></a>00449 <span class="preprocessor">    a[(j) + 1] = __rol32(y, 9)</span>
<a name="l00450"></a>00450 <span class="preprocessor"></span>
<a name="l00451"></a>00451 <span class="preprocessor">#define G1(a, s) \</span>
<a name="l00452"></a>00452 <span class="preprocessor">    ((s)[0][(a) &amp; 0xFF]) ^ ((s)[1][((a) &gt;&gt; 8) &amp; 0xFF]) ^\</span>
<a name="l00453"></a>00453 <span class="preprocessor">    ((s)[2][((a) &gt;&gt; 16) &amp; 0xFF]) ^ ((s)[3][((a) &gt;&gt; 24)])</span>
<a name="l00454"></a>00454 <span class="preprocessor"></span>
<a name="l00455"></a>00455 <span class="preprocessor">#define G2(a, s) \</span>
<a name="l00456"></a>00456 <span class="preprocessor">    ((s)[1][(a) &amp; 0xFF]) ^ ((s)[2][((a) &gt;&gt; 8) &amp; 0xFF]) ^\</span>
<a name="l00457"></a>00457 <span class="preprocessor">    ((s)[3][((a) &gt;&gt; 16) &amp; 0xFF]) ^ ((s)[0][((a) &gt;&gt; 24)])</span>
<a name="l00458"></a>00458 <span class="preprocessor"></span>
<a name="l00459"></a>00459 <span class="comment">/* Feistel加密循环 */</span>
<a name="l00460"></a>00460 <span class="preprocessor">#define ENC_ROUND(n, a, b, c, d, x, y, k, s)    \</span>
<a name="l00461"></a>00461 <span class="preprocessor">    (x) = G1(a,s);(y) = G2(b,s);(x) += (y);     \</span>
<a name="l00462"></a>00462 <span class="preprocessor">    (y) += ((x) + (k)[((n) &lt;&lt; 1) + 1]);     \</span>
<a name="l00463"></a>00463 <span class="preprocessor">    (c) ^= ((x) + (k)[(n) &lt;&lt; 1]);               \</span>
<a name="l00464"></a>00464 <span class="preprocessor">    (c) = __ror32((c), 1);                      \</span>
<a name="l00465"></a>00465 <span class="preprocessor">    (d) = (__rol32((d), 1) ^ (y))</span>
<a name="l00466"></a>00466 <span class="preprocessor"></span>
<a name="l00467"></a>00467 <span class="comment">/* Feistel解密循环 */</span>
<a name="l00468"></a>00468 <span class="preprocessor">#define DEC_ROUND(n, a, b, c, d, x, y, k, s)            \</span>
<a name="l00469"></a>00469 <span class="preprocessor">    (x) = G1(a,s);(y) = G2(b,s);(x) += (y);             \</span>
<a name="l00470"></a>00470 <span class="preprocessor">    (y) += (x);(d) ^= ((y) + (k)[((n) &lt;&lt; 1) + 1]);      \</span>
<a name="l00471"></a>00471 <span class="preprocessor">    (d) = __ror32((d), 1);(c) = __rol32((c), 1);        \</span>
<a name="l00472"></a>00472 <span class="preprocessor">    (c) ^= ((x) + (k)[(n) &lt;&lt; 1])</span>
<a name="l00473"></a>00473 <span class="preprocessor"></span>
<a name="l00474"></a>00474 <span class="comment">/* 加密循环 */</span>
<a name="l00475"></a>00475 <span class="preprocessor">#define ENC_CYCLE(n, a, b, c, d, x, y, k, s)            \</span>
<a name="l00476"></a>00476 <span class="preprocessor">    ENC_ROUND(((n) &lt;&lt; 1), a, b, c, d, x, y, k, s);      \</span>
<a name="l00477"></a>00477 <span class="preprocessor">    ENC_ROUND(((n) &lt;&lt; 1) + 1, c, d, a, b, x, y, k, s)</span>
<a name="l00478"></a>00478 <span class="preprocessor"></span>
<a name="l00479"></a>00479 <span class="comment">/* 解密循环 */</span>
<a name="l00480"></a>00480 <span class="preprocessor">#define DEC_CYCLE(n, a, b, c, d, x, y, k, s)            \</span>
<a name="l00481"></a>00481 <span class="preprocessor">    DEC_ROUND(((n) &lt;&lt; 1) + 1, c, d, a, b, x, y, k, s);  \</span>
<a name="l00482"></a>00482 <span class="preprocessor">    DEC_ROUND(((n) &lt;&lt; 1), a, b, c, d, x, y, k, s)</span>
<a name="l00483"></a>00483 <span class="preprocessor"></span>
<a name="l00484"></a>00484 <span class="preprocessor">#define IN_PACK(n, x, w, in, i) \</span>
<a name="l00485"></a>00485 <span class="preprocessor">    (x) = __le32_to_cpu((in)[(n)]) ^ (w)[(i)]</span>
<a name="l00486"></a>00486 <span class="preprocessor"></span>
<a name="l00487"></a>00487 <span class="preprocessor">#define OUT_PACK(n, x, w, dst, i) \</span>
<a name="l00488"></a>00488 <span class="preprocessor">    (x) ^= (w)[(i)];(dst)[(n)] = __cpu_to_le32(x)</span>
<a name="l00489"></a>00489 <span class="preprocessor"></span>
<a name="l00490"></a>00490 NV_IMPL <span class="keywordtype">int</span> __twofish_set_key(<a class="code" href="structtwofish__key.html" title="Twofish密钥">twofish_key</a>* key,
<a name="l00491"></a>00491                             <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a>* src_key, <span class="keywordtype">size_t</span> cnt)
<a name="l00492"></a>00492 {
<a name="l00493"></a>00493     <span class="keywordtype">int</span> i, j, k;
<a name="l00494"></a>00494     uint32_t x, y;
<a name="l00495"></a>00495     uint32_t (*S)[256] = key-&gt;<a class="code" href="structtwofish__key.html#a6ffca869dee594fad17cd75c30649511" title="置换盒">s</a>;
<a name="l00496"></a>00496     uint32_t* esk = key-&gt;<a class="code" href="structtwofish__key.html#aa9fe0559bf9c499890dc92f31dfbe1b1" title="加密钥">esk</a>;
<a name="l00497"></a>00497     uint32_t* lsk = key-&gt;<a class="code" href="structtwofish__key.html#a161d577e9026185996da76a8c132dc4a" title="循环密钥">lsk</a>;
<a name="l00498"></a>00498 
<a name="l00499"></a>00499     <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> tmp;
<a name="l00500"></a>00500     <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
<a name="l00501"></a>00501     <a class="code" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2" title="8比特无符号整型">uint8_t</a> si = 0, sj = 0, sk = 0, sl = 0, sm = 0, sn = 0, so = 0, sp = 0;
<a name="l00502"></a>00502 
<a name="l00503"></a>00503     <span class="keywordflow">if</span> (cnt &amp; 7)
<a name="l00504"></a>00504         <span class="keywordflow">return</span> 0;
<a name="l00505"></a>00505 
<a name="l00506"></a>00506     CALC_S(sa, sb, sc, sd,  0, 0x00, 0x2D, 0x01, 0x2D); <span class="comment">/* 01 A4 02 A4 */</span>
<a name="l00507"></a>00507     CALC_S(sa, sb, sc, sd,  1, 0x2D, 0xA4, 0x44, 0x8A); <span class="comment">/* A4 56 A1 55 */</span>
<a name="l00508"></a>00508     CALC_S(sa, sb, sc, sd,  2, 0x8A, 0xD5, 0xBF, 0xD1); <span class="comment">/* 55 82 FC 87 */</span>
<a name="l00509"></a>00509     CALC_S(sa, sb, sc, sd,  3, 0xD1, 0x7F, 0x3D, 0x99); <span class="comment">/* 87 F3 C1 5A */</span>
<a name="l00510"></a>00510     CALC_S(sa, sb, sc, sd,  4, 0x99, 0x46, 0x66, 0x96); <span class="comment">/* 5A 1E 47 58 */</span>
<a name="l00511"></a>00511     CALC_S(sa, sb, sc, sd,  5, 0x96, 0x3C, 0x5B, 0xED); <span class="comment">/* 58 C6 AE DB */</span>
<a name="l00512"></a>00512     CALC_S(sa, sb, sc, sd,  6, 0xED, 0x37, 0x4F, 0xE0); <span class="comment">/* DB 68 3D 9E */</span>
<a name="l00513"></a>00513     CALC_S(sa, sb, sc, sd,  7, 0xE0, 0xD0, 0x8C, 0x17); <span class="comment">/* 9E E5 19 03 */</span>
<a name="l00514"></a>00514     CALC_S(se, sf, sg, sh,  8, 0x00, 0x2D, 0x01, 0x2D); <span class="comment">/* 01 A4 02 A4 */</span>
<a name="l00515"></a>00515     CALC_S(se, sf, sg, sh,  9, 0x2D, 0xA4, 0x44, 0x8A); <span class="comment">/* A4 56 A1 55 */</span>
<a name="l00516"></a>00516     CALC_S(se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); <span class="comment">/* 55 82 FC 87 */</span>
<a name="l00517"></a>00517     CALC_S(se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); <span class="comment">/* 87 F3 C1 5A */</span>
<a name="l00518"></a>00518     CALC_S(se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); <span class="comment">/* 5A 1E 47 58 */</span>
<a name="l00519"></a>00519     CALC_S(se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); <span class="comment">/* 58 C6 AE DB */</span>
<a name="l00520"></a>00520     CALC_S(se, sf, sg, sh, 14, 0xED, 0x37, 0x4F, 0xE0); <span class="comment">/* DB 68 3D 9E */</span>
<a name="l00521"></a>00521     CALC_S(se, sf, sg, sh, 15, 0xE0, 0xD0, 0x8C, 0x17); <span class="comment">/* 9E E5 19 03 */</span>
<a name="l00522"></a>00522 
<a name="l00523"></a>00523     <span class="keywordflow">if</span> (cnt == 24 || cnt == 32) {
<a name="l00524"></a>00524         CALC_S(si, sj, sk, sl, 16, 0x00, 0x2D, 0x01, 0x2D); <span class="comment">/* 01 A4 02 A4 */</span>
<a name="l00525"></a>00525         CALC_S(si, sj, sk, sl, 17, 0x2D, 0xA4, 0x44, 0x8A); <span class="comment">/* A4 56 A1 55 */</span>
<a name="l00526"></a>00526         CALC_S(si, sj, sk, sl, 18, 0x8A, 0xD5, 0xBF, 0xD1); <span class="comment">/* 55 82 FC 87 */</span>
<a name="l00527"></a>00527         CALC_S(si, sj, sk, sl, 19, 0xD1, 0x7F, 0x3D, 0x99); <span class="comment">/* 87 F3 C1 5A */</span>
<a name="l00528"></a>00528         CALC_S(si, sj, sk, sl, 20, 0x99, 0x46, 0x66, 0x96); <span class="comment">/* 5A 1E 47 58 */</span>
<a name="l00529"></a>00529         CALC_S(si, sj, sk, sl, 21, 0x96, 0x3C, 0x5B, 0xED); <span class="comment">/* 58 C6 AE DB */</span>
<a name="l00530"></a>00530         CALC_S(si, sj, sk, sl, 22, 0xED, 0x37, 0x4F, 0xE0); <span class="comment">/* DB 68 3D 9E */</span>
<a name="l00531"></a>00531         CALC_S(si, sj, sk, sl, 23, 0xE0, 0xD0, 0x8C, 0x17); <span class="comment">/* 9E E5 19 03 */</span>
<a name="l00532"></a>00532     }
<a name="l00533"></a>00533 
<a name="l00534"></a>00534     <span class="keywordflow">if</span> (cnt == 32) {
<a name="l00535"></a>00535         CALC_S(sm, sn, so, sp, 24, 0x00, 0x2D, 0x01, 0x2D); <span class="comment">/* 01 A4 02 A4 */</span>
<a name="l00536"></a>00536         CALC_S(sm, sn, so, sp, 25, 0x2D, 0xA4, 0x44, 0x8A); <span class="comment">/* A4 56 A1 55 */</span>
<a name="l00537"></a>00537         CALC_S(sm, sn, so, sp, 26, 0x8A, 0xD5, 0xBF, 0xD1); <span class="comment">/* 55 82 FC 87 */</span>
<a name="l00538"></a>00538         CALC_S(sm, sn, so, sp, 27, 0xD1, 0x7F, 0x3D, 0x99); <span class="comment">/* 87 F3 C1 5A */</span>
<a name="l00539"></a>00539         CALC_S(sm, sn, so, sp, 28, 0x99, 0x46, 0x66, 0x96); <span class="comment">/* 5A 1E 47 58 */</span>
<a name="l00540"></a>00540         CALC_S(sm, sn, so, sp, 29, 0x96, 0x3C, 0x5B, 0xED); <span class="comment">/* 58 C6 AE DB */</span>
<a name="l00541"></a>00541         CALC_S(sm, sn, so, sp, 30, 0xED, 0x37, 0x4F, 0xE0); <span class="comment">/* DB 68 3D 9E */</span>
<a name="l00542"></a>00542         CALC_S(sm, sn, so, sp, 31, 0xE0, 0xD0, 0x8C, 0x17); <span class="comment">/* 9E E5 19 03 */</span>
<a name="l00543"></a>00543 
<a name="l00544"></a>00544         <span class="keywordflow">for</span> (i = j = 0, k = 1; i &lt; 256; i++, j += 2, k += 2) {
<a name="l00545"></a>00545             CALC_SB256_2(i, CALC_SB_TBL[j], CALC_SB_TBL[k]);
<a name="l00546"></a>00546         }
<a name="l00547"></a>00547         <span class="keywordflow">for</span> (i = 0; i &lt; 8; i += 2) {
<a name="l00548"></a>00548             CALC_K256 (esk, i, Q0[i], Q1[i], Q0[i+1], Q1[i+1]);
<a name="l00549"></a>00549         }
<a name="l00550"></a>00550         <span class="keywordflow">for</span> (i = 0; i &lt; 32; i += 2) {
<a name="l00551"></a>00551             CALC_K256 (lsk, i, Q0[i+8], Q1[i+8], Q0[i+9], Q1[i+9]);
<a name="l00552"></a>00552         }
<a name="l00553"></a>00553     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cnt == 24) {
<a name="l00554"></a>00554         <span class="keywordflow">for</span> (i = j = 0, k = 1; i &lt; 256; i++, j += 2, k += 2) {
<a name="l00555"></a>00555             CALC_SB192_2(i, CALC_SB_TBL[j], CALC_SB_TBL[k]);
<a name="l00556"></a>00556         }
<a name="l00557"></a>00557         <span class="keywordflow">for</span> (i = 0; i &lt; 8; i += 2) {
<a name="l00558"></a>00558             CALC_K192 (esk, i, Q0[i], Q1[i], Q0[i+1], Q1[i+1]);
<a name="l00559"></a>00559         }
<a name="l00560"></a>00560         <span class="keywordflow">for</span> (i = 0; i &lt; 32; i += 2) {
<a name="l00561"></a>00561             CALC_K192 (lsk, i, Q0[i+8], Q1[i+8], Q0[i+9], Q1[i+9]);
<a name="l00562"></a>00562         }
<a name="l00563"></a>00563     } <span class="keywordflow">else</span> {
<a name="l00564"></a>00564         <span class="keywordflow">for</span> (i = j = 0, k = 1; i &lt; 256; i++, j += 2, k += 2) {
<a name="l00565"></a>00565             CALC_SB_2(i, CALC_SB_TBL[j], CALC_SB_TBL[k]);
<a name="l00566"></a>00566         }
<a name="l00567"></a>00567         <span class="keywordflow">for</span> (i = 0; i &lt; 8; i += 2) {
<a name="l00568"></a>00568             CALC_K (esk, i, Q0[i], Q1[i], Q0[i+1], Q1[i+1]);
<a name="l00569"></a>00569         }
<a name="l00570"></a>00570         <span class="keywordflow">for</span> (i = 0; i &lt; 32; i += 2) {
<a name="l00571"></a>00571             CALC_K (lsk, i, Q0[i+8], Q1[i+8], Q0[i+9], Q1[i+9]);
<a name="l00572"></a>00572         }
<a name="l00573"></a>00573     }
<a name="l00574"></a>00574 
<a name="l00575"></a>00575     <span class="keywordflow">return</span> 1;
<a name="l00576"></a>00576 }
<a name="l00577"></a>00577 
<a name="l00578"></a>00578 NV_IMPL <span class="keywordtype">void</span> __twofish_encrypt(uint32_t* esk, uint32_t* lsk,
<a name="l00579"></a>00579                 uint32_t (*S)[256], uint32_t* dst, uint32_t* src)
<a name="l00580"></a>00580 {
<a name="l00581"></a>00581     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> x, y;
<a name="l00582"></a>00582     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> a, b, c, d;
<a name="l00583"></a>00583 
<a name="l00584"></a>00584     IN_PACK(0, a, esk, src, 0);
<a name="l00585"></a>00585     IN_PACK(1, b, esk, src, 1);
<a name="l00586"></a>00586     IN_PACK(2, c, esk, src, 2);
<a name="l00587"></a>00587     IN_PACK(3, d, esk, src, 3);
<a name="l00588"></a>00588 
<a name="l00589"></a>00589     ENC_CYCLE(0, a, b, c, d, x, y, lsk, S);
<a name="l00590"></a>00590     ENC_CYCLE(1, a, b, c, d, x, y, lsk, S);
<a name="l00591"></a>00591     ENC_CYCLE(2, a, b, c, d, x, y, lsk, S);
<a name="l00592"></a>00592     ENC_CYCLE(3, a, b, c, d, x, y, lsk, S);
<a name="l00593"></a>00593     ENC_CYCLE(4, a, b, c, d, x, y, lsk, S);
<a name="l00594"></a>00594     ENC_CYCLE(5, a, b, c, d, x, y, lsk, S);
<a name="l00595"></a>00595     ENC_CYCLE(6, a, b, c, d, x, y, lsk, S);
<a name="l00596"></a>00596     ENC_CYCLE(7, a, b, c, d, x, y, lsk, S);
<a name="l00597"></a>00597 
<a name="l00598"></a>00598     OUT_PACK(0, c, esk, dst, 4);
<a name="l00599"></a>00599     OUT_PACK(1, d, esk, dst, 5);
<a name="l00600"></a>00600     OUT_PACK(2, a, esk, dst, 6);
<a name="l00601"></a>00601     OUT_PACK(3, b, esk, dst, 7);
<a name="l00602"></a>00602 }
<a name="l00603"></a>00603 
<a name="l00604"></a>00604 NV_IMPL <span class="keywordtype">void</span> __twofish_decrypt(uint32_t* esk, uint32_t* lsk,
<a name="l00605"></a>00605                 uint32_t (*S)[256], uint32_t* dst, uint32_t* src)
<a name="l00606"></a>00606 {
<a name="l00607"></a>00607     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> x, y;
<a name="l00608"></a>00608     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> a, b, c, d;
<a name="l00609"></a>00609 
<a name="l00610"></a>00610     IN_PACK(0, c, esk, src, 4);
<a name="l00611"></a>00611     IN_PACK(1, d, esk, src, 5);
<a name="l00612"></a>00612     IN_PACK(2, a, esk, src, 6);
<a name="l00613"></a>00613     IN_PACK(3, b, esk, src, 7);
<a name="l00614"></a>00614 
<a name="l00615"></a>00615     DEC_CYCLE(7, a, b, c, d, x, y, lsk, S);
<a name="l00616"></a>00616     DEC_CYCLE(6, a, b, c, d, x, y, lsk, S);
<a name="l00617"></a>00617     DEC_CYCLE(5, a, b, c, d, x, y, lsk, S);
<a name="l00618"></a>00618     DEC_CYCLE(4, a, b, c, d, x, y, lsk, S);
<a name="l00619"></a>00619     DEC_CYCLE(3, a, b, c, d, x, y, lsk, S);
<a name="l00620"></a>00620     DEC_CYCLE(2, a, b, c, d, x, y, lsk, S);
<a name="l00621"></a>00621     DEC_CYCLE(1, a, b, c, d, x, y, lsk, S);
<a name="l00622"></a>00622     DEC_CYCLE(0, a, b, c, d, x, y, lsk, S);
<a name="l00623"></a>00623 
<a name="l00624"></a>00624     OUT_PACK(0, a, esk, dst, 0);
<a name="l00625"></a>00625     OUT_PACK(1, b, esk, dst, 1);
<a name="l00626"></a>00626     OUT_PACK(2, c, esk, dst, 2);
<a name="l00627"></a>00627     OUT_PACK(3, d, esk, dst, 3);
<a name="l00628"></a>00628 }
<a name="l00629"></a>00629 
<a name="l00630"></a>00630 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00631"></a>00631 <span class="preprocessor"></span>}
<a name="l00632"></a>00632 <span class="preprocessor">#endif </span><span class="comment">/* #ifdef __cplusplus */</span>
<a name="l00633"></a>00633 
<a name="l00634"></a>00634 
</pre></div></div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:37 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
